#!/bin/wish
# tcl tk第一个程序

#编译当前工程
button .comp -text "编译" \
    -command {
    exec bash mvsim -r > win.log
    set f [open "win.log" r]
    ## 按行读取文件内容
    while {[expr [gets $f line] >= 0 ]} {
        set msg "$msg\n$line"
    }
    tk_messageBox -title message -icon info -message $msg
}
button .wave -text "波形" \
    -command {
    exec bash mvsim > win.log
    set f [open "win.log" r]
    ## 按行读取文件内容
    while {[expr [gets $f line] >= 0 ]} {
        set msg "$msg\n$line"
    }
    tk_messageBox -title message -icon info -message $msg
}

button .quit -text "退出" \
    -command {
    exit
}



pack .comp -padx 60 -pady 5
pack .wave -padx 60 -pady 5

pack .quit -padx 60 -pady 5

